The present invention relates to organizing and accessing database indices. In particular, the present invention relates to a secondary index structure for indexing an index-organized table. More particularly, the present invention relates to a bitmap index for use with a primary B+tree structure. The present invention also relates to methods for creating a bitmap index for a primary B+tree structure.
In a typical relational database system, users store, update, and retrieve information by interacting with user applications. The applications respond to a user""s interaction by submitting commands to a database application, or server, responsible for maintaining the database. The database server responds to commands by performing the specified actions on the database. To be correctly processed, the commands must comply with the database language that the database server supports. One popular database language is known as Structured Query Language (SQL).
Various access methods may be utilized to retrieve data from a database. The access methods used to retrieve data may significantly affect the speed of the retrieval and the amount of resources consumed during the retrieval process. Many information retrieval applications make use of indices when performing content-based searches on the database data. Examples of database indices include R-trees, quadtrees, and B-trees.
Database indices provide organization and reference to the data in a database to permit a user to find particular items of data in the database or determine relationships among the data in the database. Database indices can also permit relationships between the data in a database and data not included in the database to be determined. For example, an index can make it possible to determine location within a certain distance of a location defined in a database comprised of geographical location information. Typically, such indices are implemented using a heap-organized table and a B-tree index.
The present invention provides a method for supporting bitmap indexes on a primary B+tree that has a mapping table associated with it. The mapping table includes primary key values from the primary B+tree. The bitmap index is built by using the row identifiers of the mapping table associated with the primary B+tree.
Furthermore, the present invention provides an alternate method for supporting bitmap indexes on a primary B+tree structure. The method includes maintaining a separate column for storing a sequence number in the primary B+tree and generating a secondary index on the separate column. The bitmap index is built by using the sequence numbers stored in the corresponding rows.
In addition to the above, the present invention provides a computer program product for performing a process of managing data in a database system. The computer program product includes a computer readable medium and computer program instructions recorded on the computer readable medium and executable by a processor. The instructions performing the steps of creating bitmap indexes on a primary B+tree that has a mapping table associated it by using the mapping table row identifiers.
Also, the present invention provides a system for performing a process of managing data in a database system. The system includes a processor operable to execute computer program instructions and a memory operable to store computer program instructions executable by the processor. The instructions perform the steps of creating bitmap indexes on a primary B+tree that includes an associated mapping table. The steps include building the bitmap indexes by using the mapping table row identifiers.
Still other objects and advantages of the present invention will become readily apparent ID by those skilled in the art from a review of the following detailed description. The detailed description shows and describes preferred embodiments of the invention, simply by way of illustration of the best mode contemplated of carrying out the present invention. As will be realized, the present invention is cap able of other and different embodiments and its several details are capable of modifications in various obvious respects, without departing from the invention. Accordingly, the drawings and description are illustrative in nature and not restrictive.